<template>
  <div class="table-list">
    <el-table v-loading="loading" :data="tableData" border fit highlight-current-row style="width: 100%">
            <el-table-column align="center" v-for="item in tableLabel" :key="item.id" :label="item.label">
                <template slot-scope="{row}">
                    <span>{{ row[item.prop] }}</span>
                </template>
            </el-table-column>
            <el-table-column v-if="show_operate" fixed="right" label="操作" width="100">
                    <template slot-scope="scope">
                        <el-button @click="handleDetail(scope.row)" type="text" size="small">详情</el-button>
                    </template>
            </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
    props: {
        loading: {
            type: Boolean,
            default: false
        },
        tableData: {
            type: Array,
        },
        tableLabel: {
            type: Array
        },
        show_operate: false,
        show_edit: false,
        show_edit: false
    },
    data() {
        return {
            
        }
    },
    methods: {
        handleDetail(item) {
            alert(item.id)
        }
    }

}
</script>

<style>

</style>